"""bookloft URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from django.conf import settings
from django.contrib.auth.models import User, Group
#from rest_framework import routers, serializers, viewsets
from django.views.generic.base import TemplateView

from common import api_views
# Routers provide an easy way of automatically determining the URL conf.
# router = routers.DefaultRouter()
# router.register(r'users', api_views.UserViewSet)
# router.register(r'groups', api_views.GroupViewSet)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', TemplateView.as_view(template_name='home/index.html'), name='home'),
    url(r'^about$', TemplateView.as_view(
        template_name='home/about.html'), name='about'),
    url(r'^donate$', TemplateView.as_view(
        template_name='home/donate.html'), name='donate'),
    url(r'^contact$', TemplateView.as_view(
        template_name='home/contact.html'), name='contact'),
    url(r'^tool$', TemplateView.as_view(
        template_name='home/tool.html'), name='tool'),
    url(r'^feedback$', TemplateView.as_view(
        template_name='home/feedback.html'), name='feedback'),
    url(r'^api-auth/', include(('rest_framework.urls', 'rest_framework'),
                               namespace='api'), name='api-auth'),
    #url(r'^api/', include(router.urls)),

    url(r'^twitter/', include(('twitter.urls', 'twitter'), namespace='twitter')),

    url(r'^wiki/', include(('wiki.urls', 'wiki'), namespace='wiki')),
    url(r'^api/', include(('wiki.api_urls', 'wiki'), namespace='wiki-api')),

    url(r'^account/', include(('common.account_urls', 'common'), namespace='account')),

    url(r'^logviewer/', include(('logviewer.urls', 'logviewer'), namespace='logviewer')),
    url(r'^api/scrum/', include(('scrum.urls_api', 'scrum'), namespace='scrum-api')),
    url(r'^scrum/', include(('scrum.urls', 'scrum'), namespace='scrum')),
    url(r'^book/', include(('book.urls', 'book'), namespace='book')),
    url(r'^hetu/', include(('hetu.urls', 'hetushu'), namespace='hetu')),
]
# if settings.DEBUG:
#     import debug_toolbar
#     urlpatterns += [
#         url(r'^__debug__/', include(debug_toolbar.urls)),
#     ]
